﻿using System.Collections.Generic;
using BoldBrick.OneIntranet.HR.Properties;
using BoldBrick.SharePoint.CommonControls.DataObjects.Base;

namespace BoldBrick.OneIntranet.HR.DataObjects.ContentTypes.CandidatesContentTypes
{
	/// <summary>
	/// Metadata class of "Result" content type
	/// </summary>
	public class ResultContentType : BaseContentType
	{
		#region ------ Content Type ID ------------------------------------------------------------

		protected override string GetContentTypeID()
		{
			return Settings.Default.ContentType_Result_ID;
		}
		
		#endregion

		#region ------ Columns --------------------------------------------------------------------

		public override List<ListColumn> GetListColumns()
		{
			List<ListColumn> columns = new List<ListColumn>();
			
			// add child columns
			columns.AddRange(GetChildListColumns());
			
			// add rest of parent columns
			columns.Add(SiteColumns.ResultSummaryColumn);
			columns.Add(SiteColumns.CandidateResultColumn);
			columns.Add(SiteColumns.CancelIfNoHireColumn);

			return columns;
		}

		/// <summary>
		/// Gets columns in child content type
		/// </summary>
		/// <returns>Returns columns in child content type</returns>
		protected virtual List<ListColumn> GetChildListColumns()
		{
			return new List<ListColumn>();
		}

		#endregion

		protected override string GetNameResourceKey()
		{
			return "ContentType_Result_Name";
		}

		protected override string GetDescriptionResourceKey()
		{
			return "ContentType_Result_Description";
		}
	}
}
